﻿using FictionsDownload.DAL;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FictionsDownload.Model
{
    /// <summary>
    /// 数据库初始化
    /// </summary>
    public class db_FictionsInitializer: CreateDatabaseIfNotExists<db_MySQL>
    {
        protected override void Seed(db_MySQL context)
        {
            db_Init.GetFolders().ForEach(c => context.Folders.Add(c));
            db_Init.GetWebFormats().ForEach(c => context.WebFormats.Add(c));
            context.SaveChanges();

        }
    }
}
